import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:meal/constant/sizes.dart';
import 'package:meal/route/route.dart';
import 'package:meal/utils/colors.dart';
import 'package:meal/utils/styles.dart';
import 'package:meal/utils/tools.dart';

///
/// 隐私管理
///
class PrivacyManage extends StatefulWidget {
  const PrivacyManage({Key? key}) : super(key: key);

  @override
  State<PrivacyManage> createState() => _PrivacyManageState();
}

class _PrivacyManageState extends State<PrivacyManage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: ToolsUtils.getDefaultBackgroundColor(),
      appBar: ToolsUtils.getDefaultBrnAppBar('隐私管理'),
      body: SingleChildScrollView(
        child: Container(
          color: Colors.white,
          padding: const EdgeInsets.symmetric(horizontal: Sizes.default15),
          child: Column(
            children: [
              InkWell(
                onTap: () {
                  Get.toNamed(RouteGet.userPrivacyAbstract);
                },
                child: Container(
                  height: Sizes.default50,
                  alignment: Alignment.centerLeft,
                  decoration: BoxDecoration(
                      border: Border(bottom: BorderSide(color: ColorsUtils.rgba(153, 153, 153, 0.095)))
                  ),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text('隐私政策摘要',
                          style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color363, fontSize: Sizes.default15)),
                      BrunoTools.getAssetSizeImage(
                          BrnAsset.iconRightArrow, Sizes.default16, Sizes.default16)
                    ],
                  ),
                ),
              ),
              InkWell(
                onTap: () {
                  Get.toNamed(RouteGet.userPrivacyPermission);
                },
                child: Container(
                  height: Sizes.default50,
                  alignment: Alignment.centerLeft,
                  decoration: BoxDecoration(
                      border: Border(bottom: BorderSide(color: ColorsUtils.rgba(153, 153, 153, 0.095)))
                  ),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text('应用权限说明',
                          style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color363, fontSize: Sizes.default15)),
                      BrunoTools.getAssetSizeImage(
                          BrnAsset.iconRightArrow, Sizes.default16, Sizes.default16)
                    ],
                  ),
                ),
              ),
              InkWell(
                onTap: () {
                  Get.toNamed(RouteGet.userPrivacyPersonal);
                },
                child: Container(
                  height: Sizes.default50,
                  alignment: Alignment.centerLeft,
                  decoration: BoxDecoration(
                      border: Border(bottom: BorderSide(color: ColorsUtils.rgba(153, 153, 153, 0.095)))
                  ),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text('个人信息收集清单',
                          style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color363, fontSize: Sizes.default15)),
                      BrunoTools.getAssetSizeImage(
                          BrnAsset.iconRightArrow, Sizes.default16, Sizes.default16)
                    ],
                  ),
                ),
              ),
              InkWell(
                onTap: () {
                  Get.toNamed(RouteGet.userPrivacyThird);
                },
                child: Container(
                  height: Sizes.default50,
                  alignment: Alignment.centerLeft,
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text('第三方共享个人信息清单',
                          style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color363, fontSize: Sizes.default15)),
                      BrunoTools.getAssetSizeImage(
                          BrnAsset.iconRightArrow, Sizes.default16, Sizes.default16)
                    ],
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
